import tpl from './index.tpl'
import './index.scss'

import { tplReplace } from '../../../utils'

export default (swipers) => {

    return {
        name: 'carouseList',
        tpl() {
            let list = ''            

            swipers.forEach(item => {
                list += tplReplace(tpl, {
                    courseId: item.course_id,
                    img: item.url,
                    courseName: item.course_name
                })
            })
            return list

        }
    }
}